.button {
  all: unset;
  border: none;
  background: none;
}

.tooltip {
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  background-color: #222;
  color: white;
  font-size: 14px;
  line-height: 1;
  user-select: none;
  will-change: transform, opacity;
}
.tooltip[data-state="delayed-open"][data-side="top"] {
  animation-name: slideDownAndFade;
}
.tooltip[data-state="delayed-open"][data-side="right"] {
  animation-name: slideLeftAndFade;
}
.tooltip[data-state="delayed-open"][data-side="bottom"] {
  animation-name: slideUpAndFade;
}
.tooltip[data-state="delayed-open"][data-side="left"] {
  animation-name: slideRightAndFade;
}

@keyframes slideUpAndFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRightAndFade {
  from {
    opacity: 0;
    transform: translateX(-2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDownAndFade {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeftAndFade {
  from {
    opacity: 0;
    transform: translateX(2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
